﻿      <!-- Fixed navbar -->
<style type="text/css">
@import url("/css/bootstrap.css");

</style>
<link href="examples/signin/signin.css" rel="stylesheet">
      <style type="text/css">
.formCadastrar{
	margin-left: 100px;
	margin-top: -120px;
	text-align: left;
	} 	
	</style> 
</div>  
<div>
	<a href="indexLogadoAdm.php"><img src="img/victim.jpg" width="183" height="117"></a>
</div> 
<div class="panel-body">
	<h2 class="h2left">Buscar Administrador</h2>
    
    
    
      <div class="form-group">
         <input type="busca por nome" class="form-control" id="nome" name="nome" style="width:300px" required>
 <button type="submit" class="btn btn-primary" name="pesquisar" style="width:100px">Pesquisar </button>
  </label> 
  
    <?php 
  	
	$nome = $_POST['nome'];
	
  	$sql = "select nomeUsuario, setorUsuario, login from usuario where nomeUsuario like '%$nome%' order by nomeUsuario and tipo == 1";
	
	$query = mysql_query($sql);
	
	while($resultado = mysql_fetch_array($query)){
	
		if( $bgcolor == "#ffffcc"){
			$bgcolor = "#ffffff";
		}else{
			print"
			
				<tr bgcolor='#ffffcc'> 
					<td bgcolor=\" $bgcolor\"> resultado[nomeUsuario]</td>	
					<td bgcolor=\" $bgcolor\"> resultado[setorUsuario]</td>	
					<td bgcolor=\" $bgcolor\"> resultado[login]</td>			
			
			";
		}
	
	
	
	}